﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:uc="clr-namespace:FileExplorer.WPF.UserControls"
    >
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/FileExplorer3.WPF;component/Themes/Default/Colors.xaml" />
        <ResourceDictionary Source="pack://application:,,,/FileExplorer3.WPF;component/Themes/Default/Brushes.xaml" />
        <ResourceDictionary Source="pack://application:,,,/FileExplorer3.WPF;component/Themes/Default/Geometry.xaml" />
        <ResourceDictionary Source="pack://application:,,,/FileExplorer3.WPF;component/Themes/Common/Buttons.xaml" />
        <ResourceDictionary Source="pack://application:,,,/FileExplorer3.WPF;component/Themes/Common/DropDown.xaml" />
        <ResourceDictionary Source="pack://application:,,,/FileExplorer3.WPF;component/Themes/Common/StatusbarItem.xaml" />
        <ResourceDictionary Source="pack://application:,,,/FileExplorer3.WPF;component/Themes/Common/Panels.xaml" />
        <!--<ResourceDictionary Source="pack://application:,,,/FileExplorer3.WPF;component/Themes/Common/ItemTemplates.xaml" />-->
    </ResourceDictionary.MergedDictionaries>

    <ItemsPanelTemplate x:Key="WrapPanelTemplate">
        <WrapPanel Orientation="Horizontal" IsItemsHost="True" />
    </ItemsPanelTemplate>
    <ItemsPanelTemplate x:Key="StackPanelTemplate">
        <StackPanel Orientation="Horizontal" IsItemsHost="True" />
    </ItemsPanelTemplate>

    <!--<uc:WrapPanelView x:Key="NonExpandedView">
        
    </uc:WrapPanelView>
    <uc:StackPanelView x:Key="ExpandedView">

    </uc:StackPanelView>-->

    <Style TargetType="{x:Type uc:StatusbarEx}">
        
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type uc:StatusbarEx}">
                    <Border x:Name="outerBorder" BorderBrush="{TemplateBinding BorderBrush}" 
                            BorderThickness="{TemplateBinding BorderThickness}" Padding="5" >
                        <DockPanel VerticalAlignment="Top"  >
                            <ContentControl Content="{TemplateBinding Header}" DockPanel.Dock="Left" 
                                        VerticalAlignment="Top" Padding="5,0,15,0" />
                            <ItemsPresenter x:Name="itemPresenter" VerticalAlignment="Center" HorizontalAlignment="Left" />
                            <!--<ListView 
                                    x:Name="MetadataList"
                                ItemsSource="{Binding Items, RelativeSource={RelativeSource AncestorType={x:Type uc:StatusbarEx}}}" 
                                      View="{StaticResource NonExpandedView}">
                                <ListView.Template>
                                    <ControlTemplate>
                                        <ItemsPresenter />
                                    </ControlTemplate>
                                </ListView.Template>
                            </ListView>-->
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded" Value="True">
                            <!--<Setter TargetName="outerBorder" Property="BorderBrush" Value="Black" />-->
                            <Setter TargetName="itemPresenter" Property="HorizontalAlignment" Value="Center" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <WrapPanel Orientation="Horizontal" IsItemsHost="True" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>